1. Field of the Invention
This invention relates to a method of applying patches to computer program code concurrently with its execution on a machine and, more particularly, to a method of applying such concurrent patches to the logical partition manager of a logically partitioned system.
2. Description of the Related Art
Logically partitioned computer systems are well known in the art. Examples of such logically partitioned systems are described in U.S. Pat. No. 4,564,903 issued to Guyette et al. and U.S. Pat. No. 4,843,541 issued to Bean et al., as well as in the copending application of applicant Jeffrey P. Kubala, Ser. No. 08/335,609, now U.S. Pat. No. 5,564,040 filed Nov. 8, 1994, entitled xe2x80x9cApparatus and Method for Establishing Server Mode Partitions in a Logically Partitioned Data Processing Systemxe2x80x9d, the specifications of which are incorporated herein by reference. Commercial embodiments of logically partitioned systems include those sold by the assignee of this application under the trademarks Processor Resource/Systems Manager and PR/SM.
Logical partitioning allows the establishment of a plurality of system images within a single physical computer system. Each system image, in turn, is capable of operating as if it were a separate and independent computer system. That is, each logical partition can be independently reset, initially loaded with an operating system that is potentially different for each logical partition, and operate with different software programs using different input/output (I/O) devices. Logical partitioning is in common use today because it provides its users with flexibility to change the number of logical partitions in use and the amount of physical system resources assigned to each partition, in some cases while the entire system continues to operate.
Computer users have long had a need for continuous non-disrupted operation. Activation of logical partition manager patches has, until now, required a power-on reset (POR), thereby disrupting system operation. It would be desirable, however, to have a means for applying program patches to logical partition manager code concurrently with its execution.
Concurrent patches have been previously applied to various types of computer system code. However, the conditions under which they are applied cannot be readily extended to the logical partition manager. Thus, central processor microcode patch is implemented by varying off one central processor at a time, updating the microcode for that central processor and varying it back on. A logical partition manager cannot do this because there is only one instantiation of logical partition manager microcode, not one per central processor. Also, central processor microcode cannot be patched on a uniprocessor without causing disruption of existent work load.
Channel and input/output (I/O) processor (IOP) microcode both maintain a second copy of their code which is updated during a concurrent patch. This is expensive in terms of storage. Also, the logical partition manager is unable to use this method because of its work queues and tables, which would have to be rebuilt in their entirety before switching to another copy of logical partition manager.
The present invention contemplates a method of replacing a current version of a program module with a replacement version of the module concurrently with the execution of the program on a computer system. For each entry point within the current version of said module to which the program may make address reference, a corresponding entry point within the replacement version of the module is determined. While execution of the program is suspended, each address reference in the program to an entry point within the current version of the module is replaced with an address reference to the corresponding entry point within the replacement version of the module. Execution of the program is resumed when each address reference to the current module has been replaced with one to the replacement module.
The present invention thus allows currently executing tasks to continue execution. Although the present invention is generally useful for applying concurrent patches to program code, it is especially useful for applying concurrent patches to the code of a logical partition manager, which exists in only one instantiation and does not have a backup copy. There is no disruption of tasks being executed by either the logical partitions or the logical partition manager. While a multiprocessor environment is described, logical partition manager or other program code concurrently patchable on a uniprocessor.